package com.czmh.etc.onlinepubsys.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 资讯信息表
 * </p>
 *
 * @author eric
 * @since 2021-06-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_content")
@ApiModel(value="CmsContent对象", description="资讯信息表")
public class CmsContent implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "资讯分类id")
    private Long categoryId;

    @ApiModelProperty(value = "资讯标题")
    private String title;

    @ApiModelProperty(value = "资讯封面")
    private String icon;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "展示状态(0不展示 1展示)")
    private Integer showStatus;

    @ApiModelProperty(value = "阅读数")
    private Integer readCount;

    @ApiModelProperty(value = "资讯内容")
    private String content;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "0.未删除 1.删除")
    private Integer deleteFlag;

    @ApiModelProperty(value = "录入员ID")
    private Long createUserId;

    @ApiModelProperty(value = "录入员")
    private String createUserName;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人ID")
    private Long updatedUserId;

    @ApiModelProperty(value = "更新人")
    private String updatedUserName;

    @ApiModelProperty(value = "更新时间")
    private Date updatedTime;


    /**
     * 开始生效时间
     **/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "开始生效时间")
    private Date beginTime;

    /**
     * 结束生效时间
     **/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "结束生效时间")
    private Date endTime;


    @TableField(exist = false)
    @ApiModelProperty("是否收藏： 0未收藏 1已收藏")
    private Integer isCollect = 0;
}
